//
// Created by 紫霄 on 2020/4/7.
//

#ifndef LEETCODE_05_H
#define LEETCODE_05_H

#include <sstream>
#include <string>
using namespace std;
class Solution {
public:
  string replaceSpace(string s) {
    string m;
    int size = s.size();
    for (int i = 0; i < size; ++i) {
      if (s[i] != ' ') {
        m += s[i];
      } else {
        m += "%20";
      }
    }
    return m;
  }
};
#endif // LEETCODE_05_H
